<template>
	<view>
		<view class="yz" v-if="weihzi">
			<text>{{weihzi}}</text>
			<button @click="editAddress" style="margin-top: 14px;">修改意向范围</button>
		</view>
		<view class="mz" v-else>

			<map-Point @commitCheck="commitCheck" :mapKey='mapKey' :Radius='Radius' :showResetting='showResetting'
				:listIco='listIco' :orientationIco='orientationIco' :resettingIco='resettingIco'
				:configData='configData'></map-Point>

		</view>

	</view>
</template>

<script>
	import permision from "@/js_sdk/wa-permission/permission.js"

	export default {
		data() {
			return {
				weihzi: "",
				mapKey: 'd42d236fb521900c51051219718ceb7d',
				address: '',
				latitude: '',
				longitude: '',
				listIco: '/uni_modules/map-Point/static/item-inx.png',
				orientationIco: '/uni_modules/map-Point/static/map-inx.png',
				resettingIco: "/uni_modules/map-Point/static/position.png",
				showResetting: true,
				Radius: '',
				// 微信公众号jsSdk配置
				configData: {
					debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
					appId: '', // 必填，公众号的唯一标识
					timestamp: '', // 必填，生成签名的时间戳
					nonceStr: '', // 必填，生成签名的随机串
					signature: '', // 必填，签名
				}
			};
		},
		methods: {
			commitCheck(e) {
				// console.log(e, 565);
				uni.$emit('commitCheck', e);

				this.weihzi = e.province + e.city + e.district + e.address + e.name
				// uni.navigateBack({
				//     delta: 1
				// });
			},
			editAddress() {
				this.weihzi = ""
			}
		}
	};
</script>

<style lang="scss">
	.yz {
		margin: 8px;
		display: flex;
		flex-direction: column;
	}
</style>